/**
 *  @author CY
 * @description  按需引入Vant
 */
import {
  Button,
  Tabbar,
  TabbarItem,
  Sticky,
  NavBar,
  Icon,
  Search,
  DropdownMenu,
  DropdownItem,
  Image,
  Lazyload,
  Tabs,
  Tab,
  Toast,
  Field,
  Cell,
  CellGroup,
  Form,
  List,
  Checkbox,
  CheckboxGroup,
  RadioGroup,
  Radio,
  Slider,
  Switch,
  Calendar,
  Cascader,
  Popup
} from 'vant'
import { App } from 'vue'
const pluginsVant = [
  Button,
  Tabbar,
  TabbarItem,
  Sticky,
  NavBar,
  Icon,
  Search,
  DropdownMenu,
  DropdownItem,
  Image,
  Lazyload,
  Tabs,
  Tab,
  Toast,
  Field,
  Cell,
  CellGroup,
  Form,
  List,
  Checkbox,
  CheckboxGroup,
  RadioGroup,
  Radio,
  Slider,
  Switch,
  Calendar,
  Cascader,
  Popup
]
export const vantPlugins = {
  install: function (vm: App) {
    pluginsVant.forEach((item: any) => {
      vm.component(item.name, item)
    })
  }
}
